<template>
  <!-- 全局国际化配置 -->
  <a-config-provider :locale="locale">
    <router-view></router-view>
  </a-config-provider>
  <stagewise-toolbar v-if="isDev" :config="stagewiseConfig" />
</template>

<script setup>
import { ref } from 'vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import { StagewiseToolbar } from '@stagewise/toolbar-vue'

dayjs.locale('zh-cn')
// 国际化配置
const locale = zhCN

// stagewise配置
const stagewiseConfig = {
  plugins: []
}

// 确保只在开发环境中运行
const isDev = ref(import.meta.env.MODE === 'development' || import.meta.env.DEV)
</script>

<style lang="scss">
</style>
